how to use spline interpolation